#include "StringOps.h"

#include <algorithm>

using std::map;

namespace StringOps
{
	void substitute(QString& text, const map<QString, QChar>& subs)
	{
		// Search through the text once for each replace string.
		for (map<QString, QChar>::const_iterator miter = subs.begin();
				miter != subs.end(); ++miter)
		{
			// TODO: just store QStrings
			text.replace(miter->first, QString(miter->second));
			//substitute(text, miter->first, miter->second);
		}
	}
}
